using System;
using System.Configuration;
using ICSharpCode.NRefactory;

namespace ModelGenerator.ModelGenerator
{
    public class ModelMover
    {
        /// <summary>
        /// Moves the model.
        /// </summary>
        /// <param name="modelClass">The model class.</param>
        public static void moveModel(Type modelClass)
        {
            var filePath = string.Format(@"{0}\Schema\TestDomain.cs",
                                         ConfigurationManager.AppSettings["TargetSchemaDir"]);
            var parser = ParserFactory.CreateParser(filePath);
            parser.Parse();
            parser.CompilationUnit.AcceptVisitor(
                new ClassVisitor(filePath, ConfigurationManager.AppSettings["TargetModelDirectory"],
                                 ConfigurationManager.AppSettings["ModelNamespace"]), null);
        }
    }
} ;